package com.netty.controller;

import com.cx.item.common.vo.ResultPageVo;
import com.netty.model.entity.Msg;
import com.netty.services.MsgService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
@RequestMapping("/msg")
public class MsgController {

    @Autowired
    private MsgService msgService;

    @ApiOperation("查询所有未签收消息列表")
    @GetMapping("/getUnReadMsgList")
    public ResultPageVo<List<Msg>> getUnReadMsgList(Integer acceptUserId){

        List<Msg> msgList = msgService.getUnReadMsgList(acceptUserId);

        return ResultPageVo.success(msgList);
    }

}
